<?php

//$_GET[$getid]=$genid;
//$_GET['page']=$genpage;
//echo $_GET[$id];

/*$incfile=PATH_PRE.'dpmain/lang/'.$d_basicset['langpak'].'/fore.php';
if (!include $incfile) dperror($l_error['adminlang'],$incfile,true);
$head=gethead($tpltype);
extract($head);*/
//unset($head);

$tmp1 = $_SCONFIG['template'];
$tmp2 = $_SCONFIG['t_per'];
$_SCONFIG['template'] = 'template/default';
$_SCONFIG['t_per'] = 'before';

if (file_exists( S_ROOT.'template/default/' . $gentplfile . '.htm')) {
	ob_start();

	include template($gentplfile);
	
	$contents=ob_get_contents();

	ob_end_clean();

} else {
	//dperror($l_error['cant_fetchdata'],$gentplfile,true);
}
//$contents=output_replace($contents);
if (swritefile(S_ROOT.$htmlfile,$contents)) {
	unset($contents);
} else {
	//dperror($l_error['cant_writedata'],$htmlfile,true);
}

$_SCONFIG['template'] = $tmp1;
$_SCONFIG['t_per'] = $tmp2;

?>